package com.weixing.mall.provider.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.weixing.mall.base.orm.MPage;
import com.weixing.mall.provider.api.model.vo.AgentMemberVo;
import com.weixing.mall.provider.api.model.vo.MemberRpcVo;
import com.weixing.mall.provider.model.domain.Member;
import com.weixing.mall.provider.model.query.MemberBindQuery;
import com.weixing.mall.provider.model.query.MemberQuery;
import com.weixing.mall.provider.model.vo.MemberBindVo;
import com.weixing.mall.provider.model.vo.MemberListVo;
import com.weixing.mall.provider.model.vo.MemberVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 会员模块-会员表 Mapper 接口
 * </p>
 *
 * @author Small
 * @since 2019-11-13
 */
public interface MemberMapper extends BaseMapper<Member> {

    MemberVo selectDetail(long id);

    IPage<MemberListVo> selectListOfPage(@Param("pg") Page page, @Param("qs") MemberQuery memberQuery);

    MPage<AgentMemberVo> selectAgentMemberOfPage(@Param("pg") MPage page, @Param("agentId") long agentId);

    IPage<MemberBindVo> memberBindlist(@Param("pg") Page page,@Param("qs") MemberBindQuery memberBindQuery);

    List<Long> selectByCustomerId(long currentUserId);

    MemberRpcVo selectByIdMemberRpcVo(Long id);

    void BinDel(Long id);
    /*解绑代理商*/
    void unAgent(@Param("mobile") String mobile);

    List<String> loadAgentCid(String[] agentIds);

    String getAgentCid(Long agentId);
}
